#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int maxn = 1100;
int a[maxn];
int main()
{
	int n;
	int ans = 0;
	scanf("%d",&n);
	int cnt = 0;
	for(int i = 1;i<=n;i=i+2)
	{
		a[++cnt] = i;
	}
	if(n%2==0) a[++cnt] = n;
	printf("%d\n",cnt);
	printf("%d",a[1]);
	for(int i = 2;i<=cnt;i++)
	{
		printf(" %d",a[i]);
	}
	printf("\n");
}
